import AxiosDIY, { payload } from '@T2/service/axios.ts';

/* 接口文档common部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const departmentApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/department/');
export const departmentById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/department/${payload.id}/`);
export const departmenttypeApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/departmenttype/');
export const departmenttypeById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/departmenttype/${payload.id}/`);

export const functionApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/function/');
export const functionById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/function/${payload.id}/`);

export const fileApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/file/');
export const fileById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/file/${payload.id}/`);

export const iuserRegister = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/register/');
export const iuserLogin = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/login/');
export const iuserLogout = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/logout/');
export const iuserPhonecode = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/phonecode/');
export const iuserRepassword = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/repassword/');
export const iuserRepasswordbyold = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/repasswordbyold/');

export const iuserInfo = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/info/');

export const iuserApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/iuser/');
export const iuserById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/iuser/${payload.id}/`);

export const informationdisclosureApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/informationdisclosure/');
export const informationdisclosureById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/informationdisclosure/${payload.id}/`);

export const logApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/log/');
export const logById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/log/${payload.id}/`);

export const menuApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/menu/');
export const menuById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/menu/${payload.id}/`);

export const optionApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/option/');
export const optionById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/option/${payload.id}/`);

export const roleApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/role/');
export const roleById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/role/${payload.id}/`);
export const roleTree = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/role/tree/');

export const styleApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/common/rest/style/');
export const styleById = (payload: payload) => AxiosDIY(payload, `/ruoshui/common/rest/style/${payload.id}/`);

/* 接口文档device部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const cameraApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/camera/');
export const cameraById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/camera/${payload.id}/`);
export const cameraEles = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/camera/?eles=t`);

export const caeventv1stepApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/caeventv1step/');
export const caeventv1stepById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/caeventv1step/${payload.id}/`);

export const deviceApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/device/');
export const deviceById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/device/${payload.id}/`);
export const deviceMultiple = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/device/multiple/');

export const deviceUpdatesensor = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/device/updatesensor/');

export const devicetypeApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/devicetype/');
export const devicetypeById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/devicetype/${payload.id}/`);

export const devicegroupApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/devicegroup/');
export const devicegroupById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/devicegroup/${payload.id}/`);
export const devicegroupkeyApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/devicegroupkey/');
export const devicegroupkeyById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/devicegroupkey/${payload.id}/`);
export const devicegroupkeyvalueApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/devicegroupkeyvalue/');
export const devicegroupkeyvalueById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/devicegroupkeyvalue/${payload.id}/`);

export const eventv1Api = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/eventv1/');
export const eventv1ById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/eventv1/${payload.id}/`);

export const gateApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/gate/');
export const gateById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/gate/${payload.id}/`);

export const gatedataApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/gatedata/');
export const gatedataById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/gatedata/${payload.id}/`);
export const gatedataMultiple = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/gatedata/multiple/');

export const guzhangApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/guzhang/');
export const guzhangById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/guzhang/${payload.id}/`);
export const guzhangstepApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/guzhangstep/');
export const guzhangstepById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/guzhangstep/${payload.id}/`);
export const guzhangUnitcountApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/guzhang/unitcount/');

export const positionApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/position/');
export const positionById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/position/${payload.id}/`);

export const pupunitApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/pupunit/');
export const pupunitById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/pupunit/${payload.id}/`);

export const regionalApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/regional/');
export const regionalById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/regional/${payload.id}/`);


export const simApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/sim/');
export const simById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sim/${payload.id}/`);

export const structApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/struct/');
export const structById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/struct/${payload.id}/`);

export const sensorApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/sensor/');
export const sensorById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sensor/${payload.id}/`);
export const sensorMultiple = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/sensor/multiple/');
export const sensorByIdCtrl = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sensor/${payload.id}/ctrl/`);
export const sensorByIdData = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sensor/${payload.id}/data/`);
export const sensorByIdDvalue = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sensor/${payload.id}/dvalue/`);
export const sensorByIdDiff = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sensor/${payload.id}/diff/`);

export const sensorTree = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/sensor/tree/');

export const sensorgroupApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/sensorgroup/');
export const sensorgroupById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/sensorgroup/${payload.id}/`);

export const statementApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/statement/');
export const statementById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/statement/${payload.id}/`);
export const statementMultiple = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/statement/multiple/');
export const statementitemApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/statementitem/');
export const statementitemById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/statementitem/${payload.id}/`);
export const statementAdd = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/statement/add/`);
export const statementByIdChange = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/statement/${payload.id}/change/`);
export const statementdataApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/statementdata/');
export const statementdataById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/statementdata/${payload.id}/`);

export const unitApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/unit/');
export const unitById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/unit/${payload.id}/`);

export const warnruleApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/warnrule/');
export const warnruleById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/warnrule/${payload.id}/`);
export const warnruleMultiple = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/warnrule/multiple/');

export const warnApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/warn/');
export const warnUnitcount = (payload: payload) => AxiosDIY(payload, '/ruoshui/device/rest/warn/unitcount/');
export const warnById = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/warn/${payload.id}/`);
export const warnMultiple = (payload: payload) => AxiosDIY(payload, `/ruoshui/device/rest/warn/multiple/`);

/* 接口文档project部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const companyApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/project/rest/company/');
export const companyById = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/company/${payload.id}/`);

export const companymenuApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/project/rest/companymenu/');
export const companymenuById = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/companymenu/${payload.id}/`);
export const companyByIdItems = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/company/${payload.id}/items/`);

export const iconApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/project/rest/icon/');
export const iconById = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/icon/${payload.id}/`);

export const icongroupApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/project/rest/icongroup/');
export const icongroupById = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/icongroup/${payload.id}/`);

export const projectApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/project/rest/project/');
export const projectById = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/project/${payload.id}/`);
export const projectByIdCp = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/project/${payload.id}/cp/`);

export const projectmenuApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/project/rest/projectmenu/');
export const projectmenuById = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/projectmenu/${payload.id}/`);
export const projectByIdItems = (payload: payload) => AxiosDIY(payload, `/ruoshui/project/rest/project/${payload.id}/items/`);

/* 接口文档shengchan部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const workApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/shengchan/rest/work/');
export const workById = (payload: payload) => AxiosDIY(payload, `/ruoshui/shengchan/rest/work/${payload.id}/`);

/* 接口文档zutai部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const pageApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/zutai/rest/page/');
export const pageById = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/page/${payload.id}/`);
export const pageByIdFabu = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/page/${payload.id}/fabu/`);

export const pageitemApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/zutai/rest/pageitem/');
export const pageitemById = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/pageitem/${payload.id}/`);
export const pageByIdItems = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/page/${payload.id}/items/`);

export const picgroupApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/zutai/rest/picgroup/');
export const picgroupById = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/picgroup/${payload.id}/`);

export const picApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/zutai/rest/pic/');
export const picById = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/pic/${payload.id}/`);

export const zApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/zutai/rest/z/');
export const zById = (payload: payload) => AxiosDIY(payload, `/ruoshui/zutai/rest/z/${payload.id}/`);


/* 接口文档bimface部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const elementApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/bimface/rest/element/');
export const elementById = (payload: payload) => AxiosDIY(payload, `/ruoshui/bimface/rest/element/${payload.id}/`);

export const modelApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/bimface/rest/model/');
export const modelById = (payload: payload) => AxiosDIY(payload, `/ruoshui/bimface/rest/model/${payload.id}/`);


/* 接口文档flow部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const flowApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/flow/');
export const flowById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/flow/${payload.id}/`);

export const nodeApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/node/');
export const nodeById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/node/${payload.id}/`);

export const edgeApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/edge/');
export const edgeById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/edge/${payload.id}/`);
export const edgeByIdClick = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/edge/${payload.id}/click/`);

export const eventApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/event/');
export const eventById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/event/${payload.id}/`);

export const formApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/form/');
export const formById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/form/${payload.id}/`);

export const eventlogApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/eventlog/');
export const eventlogById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/eventlog/${payload.id}/`);

export const eventnodeuserApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/eventnodeuser/');
export const eventnodeuserById = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/eventnodeuser/${payload.id}/`);
export const eventnodeuserCount = (payload: payload) => AxiosDIY(payload, '/ruoshui/flow/rest/eventnodeuser/count/');

export const eventByIdMessage = (payload: payload) => AxiosDIY(payload, `/ruoshui/flow/rest/event/${payload.id}/message/`);

/* 接口文档space部分，请查阅https://hengji.ieieye.com/ruoshui/docs/接口文档 */
export const spaceApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/space/rest/space/');
export const spaceById = (payload: payload) => AxiosDIY(payload, `/ruoshui/space/rest/space/${payload.id}/`);
export const space2userApi = (payload: payload) => AxiosDIY(payload, '/ruoshui/space/rest/space2user/');
export const space2userById = (payload: payload) => AxiosDIY(payload, `/ruoshui/space/rest/space2user/${payload.id}/`);